class PresentersResponse {
  late String message;
  late int errNo;
  late List<Data> data;

  PresentersResponse(
      {required this.message, required this.errNo, required this.data});

  PresentersResponse.fromJson(Map<String, dynamic> json) {
    message = json['message'];
    errNo = json['err_no'];
    if (json['data'] != null) {
      data = [];
      json['data'].forEach((v) {
        data.add(new Data.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['message'] = this.message;
    data['err_no'] = this.errNo;

    data['data'] = this.data.map((v) => v.toJson()).toList();

    return data;
  }
}

class Data {
  late Comment comment;
  late Null ad;
  late Null embeddedData;
  late int id;
  late int cellType;

  Data(
      {required this.comment,
      required this.ad,
      required this.embeddedData,
      required this.id,
      required this.cellType});

  Data.fromJson(Map<String, dynamic> json) {
    comment = json['comment'] = new Comment.fromJson(json['comment']);
    ad = json['ad'];
    embeddedData = json['embedded_data'];
    id = json['id'];
    cellType = json['cell_type'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();

    data['comment'] = this.comment.toJson();

    data['ad'] = this.ad;
    data['embedded_data'] = this.embeddedData;
    data['id'] = this.id;
    data['cell_type'] = this.cellType;
    return data;
  }
}

class Comment {
  int? id;
  String? idStr;
  String? text;
  String? contentRichSpan;
  int? replyCount;
  List<ReplyList>? replyList;
  String? voteInfo;
  int? diggCount;
  int? buryCount;
  int? forwardCount;
  int? createTime;
  double? score;
  int? userId;
  String? userName;
  String? remarkName;
  String? userProfileImageUrl;
  bool? userVerified;
  int? interactStyle;
  int? isFollowing;
  int? isFollowed;
  int? isBlocking;
  int? isBlocked;
  int? isPgcAuthor;
  List<dynamic>? authorBadge;
  List<String>? authorBadgeNight;
  String? verifiedReason;
  int? userBury;
  int? userDigg;
  int? userRelation;
  String? userAuthInfo;
  String? userDecoration;
  String? bandUrl;
  String? bandName;
  int? aid;
  String? authorActBadge;
  String? authVerifiedInfo;
  List<String>? largeImageList;
  List<String>? thumbImageList;
  MediaInfo? mediaInfo;
  String? tags;
  String? platform;
  int? hasAuthorDigg;
  String? multiMedia;
  bool? hasMultiMedia;
  int? showTags;
  bool? isRepost;
  int? dislikeStyle;
  String? pendants;
  String? source;
  int? diggBuryStyle;

  Comment(
      {this.id,
      this.idStr,
      this.text,
      this.contentRichSpan,
      this.replyCount,
      this.replyList,
      this.voteInfo,
      this.diggCount,
      this.buryCount,
      this.forwardCount,
      this.createTime,
      this.score,
      this.userId,
      this.userName,
      this.remarkName,
      this.userProfileImageUrl,
      this.userVerified,
      this.interactStyle,
      this.isFollowing,
      this.isFollowed,
      this.isBlocking,
      this.isBlocked,
      this.isPgcAuthor,
      this.authorBadge,
      this.authorBadgeNight,
      this.verifiedReason,
      this.userBury,
      this.userDigg,
      this.userRelation,
      this.userAuthInfo,
      this.userDecoration,
      this.bandUrl,
      this.bandName,
      this.aid,
      this.authorActBadge,
      this.authVerifiedInfo,
      this.largeImageList,
      this.thumbImageList,
      this.mediaInfo,
      this.tags,
      this.platform,
      this.hasAuthorDigg,
      this.multiMedia,
      this.hasMultiMedia,
      this.showTags,
      this.isRepost,
      this.dislikeStyle,
      this.pendants,
      this.source,
      this.diggBuryStyle});

  Comment.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    idStr = json['id_str'];
    text = json['text'];
    contentRichSpan = json['content_rich_span'];
    replyCount = json['reply_count'];
    if (json['reply_list'] != null) {
      replyList = [];
      json['reply_list'].forEach((v) {
        replyList!.add(new ReplyList.fromJson(v));
      });
    }
    voteInfo = json['vote_info'];
    diggCount = json['digg_count'];
    buryCount = json['bury_count'];
    forwardCount = json['forward_count'];
    createTime = json['create_time'];
    score = json['score'];
    userId = json['user_id'];
    userName = json['user_name'];
    remarkName = json['remark_name'];
    userProfileImageUrl = json['user_profile_image_url'];
    userVerified = json['user_verified'];
    interactStyle = json['interact_style'];
    isFollowing = json['is_following'];
    isFollowed = json['is_followed'];
    isBlocking = json['is_blocking'];
    isBlocked = json['is_blocked'];
    isPgcAuthor = json['is_pgc_author'];
    if (json['author_badge'] != null) {
      authorBadge = [];
      json['author_badge'].forEach((v) {
        authorBadge!.add(v);
      });
    }
    if (json['author_badge_night'] != null) {
      authorBadgeNight = [];
      json['author_badge_night'].forEach((v) {
        authorBadgeNight!.add(v);
      });
    }
    verifiedReason = json['verified_reason'];
    userBury = json['user_bury'];
    userDigg = json['user_digg'];
    userRelation = json['user_relation'];
    userAuthInfo = json['user_auth_info'];
    userDecoration = json['user_decoration'];
    bandUrl = json['band_url'];
    bandName = json['band_name'];
    aid = json['aid'];
    authorActBadge = json['author_act_badge'];
    authVerifiedInfo = json['auth_verified_info'];
    if (json['large_image_list'] != null) {
      largeImageList = [];
      json['large_image_list'].forEach((v) {
        largeImageList!.add(v);
      });
    }
    if (json['thumb_image_list'] != null) {
      thumbImageList = [];
      json['thumb_image_list'].forEach((v) {
        thumbImageList!.add(v);
      });
    }
    mediaInfo = json['media_info'] != null
        ? new MediaInfo.fromJson(json['media_info'])
        : null;
    tags = json['tags'];
    platform = json['platform'];
    hasAuthorDigg = json['has_author_digg'];
    multiMedia = json['multi_media'];
    hasMultiMedia = json['has_multi_media'];
    showTags = json['show_tags'];
    isRepost = json['is_repost'];
    dislikeStyle = json['dislike_style'];
    pendants = json['pendants'];
    source = json['source'];
    diggBuryStyle = json['digg_bury_style'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['id_str'] = this.idStr;
    data['text'] = this.text;
    data['content_rich_span'] = this.contentRichSpan;
    data['reply_count'] = this.replyCount;
    if (this.replyList != null) {
      data['reply_list'] = this.replyList!.map((v) => v.toJson()).toList();
    }
    data['vote_info'] = this.voteInfo;
    data['digg_count'] = this.diggCount;
    data['bury_count'] = this.buryCount;
    data['forward_count'] = this.forwardCount;
    data['create_time'] = this.createTime;
    data['score'] = this.score;
    data['user_id'] = this.userId;
    data['user_name'] = this.userName;
    data['remark_name'] = this.remarkName;
    data['user_profile_image_url'] = this.userProfileImageUrl;
    data['user_verified'] = this.userVerified;
    data['interact_style'] = this.interactStyle;
    data['is_following'] = this.isFollowing;
    data['is_followed'] = this.isFollowed;
    data['is_blocking'] = this.isBlocking;
    data['is_blocked'] = this.isBlocked;
    data['is_pgc_author'] = this.isPgcAuthor;
    if (this.authorBadge != null) {
      data['author_badge'] = this.authorBadge!.map((v) => v.toJson()).toList();
    }
    if (this.authorBadgeNight != null) {
      data['author_badge_night'] =
          this.authorBadgeNight!.map((v) => v).toList();
    }
    data['verified_reason'] = this.verifiedReason;
    data['user_bury'] = this.userBury;
    data['user_digg'] = this.userDigg;
    data['user_relation'] = this.userRelation;
    data['user_auth_info'] = this.userAuthInfo;
    data['user_decoration'] = this.userDecoration;
    data['band_url'] = this.bandUrl;
    data['band_name'] = this.bandName;
    data['aid'] = this.aid;
    data['author_act_badge'] = this.authorActBadge;
    data['auth_verified_info'] = this.authVerifiedInfo;
    if (this.largeImageList != null) {
      data['large_image_list'] = this.largeImageList!.map((v) => v).toList();
    }
    if (this.thumbImageList != null) {
      data['thumb_image_list'] = this.thumbImageList!.map((v) => v).toList();
    }
    if (this.mediaInfo != null) {
      data['media_info'] = this.mediaInfo!.toJson();
    }
    data['tags'] = this.tags;
    data['platform'] = this.platform;
    data['has_author_digg'] = this.hasAuthorDigg;
    data['multi_media'] = this.multiMedia;
    data['has_multi_media'] = this.hasMultiMedia;
    data['show_tags'] = this.showTags;
    data['is_repost'] = this.isRepost;
    data['dislike_style'] = this.dislikeStyle;
    data['pendants'] = this.pendants;
    data['source'] = this.source;
    data['digg_bury_style'] = this.diggBuryStyle;
    return data;
  }
}

class ReplyList {
  int? id;
  String? idStr;
  int? createTime;
  String? text;
  String? contentRichSpan;
  int? userId;
  String? userName;
  bool? userVerified;
  String? userAuthInfo;
  String? userProfileImageUrl;
  String? bandUrl;
  String? bandName;
  int? isBlocking;
  int? isBlocked;
  String? authVerifiedInfo;
  int? isPgcAuthor;
  late List<AuthorBadge> authorBadge;
  List<AuthorBadgeNight>? authorBadgeNight;
  int? diggCount;
  int? userDigg;
  int? buryCount;
  int? userBury;
  List<String>? thumbImageList;
  List<String>? largeImageList;
  String? pendants;

  ReplyList(
      {required this.id,
      required this.idStr,
      required this.createTime,
      required this.text,
      required this.contentRichSpan,
      required this.userId,
      required this.userName,
      required this.userVerified,
      required this.userAuthInfo,
      required this.userProfileImageUrl,
      required this.bandUrl,
      required this.bandName,
      required this.isBlocking,
      required this.isBlocked,
      required this.authVerifiedInfo,
      required this.isPgcAuthor,
      required this.authorBadge,
      required this.authorBadgeNight,
      required this.diggCount,
      required this.userDigg,
      required this.buryCount,
      required this.userBury,
      required this.thumbImageList,
      required this.largeImageList,
      required this.pendants});

  ReplyList.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    idStr = json['id_str'];
    createTime = json['create_time'];
    text = json['text'];
    contentRichSpan = json['content_rich_span'];
    userId = json['user_id'];
    userName = json['user_name'];
    userVerified = json['user_verified'];
    userAuthInfo = json['user_auth_info'];
    userProfileImageUrl = json['user_profile_image_url'];
    bandUrl = json['band_url'];
    bandName = json['band_name'];
    isBlocking = json['is_blocking'];
    isBlocked = json['is_blocked'];
    authVerifiedInfo = json['auth_verified_info'];
    isPgcAuthor = json['is_pgc_author'];
    if (json['author_badge'] != null) {
      authorBadge = [];
      json['author_badge'].forEach((v) {
        authorBadge.add(new AuthorBadge.fromJson(v));
      });
    }
    if (json['author_badge_night'] != null) {
      authorBadgeNight = [];
      json['author_badge_night'].forEach((v) {
        authorBadgeNight!.add(new AuthorBadgeNight.fromJson(v));
      });
    }
    diggCount = json['digg_count'];
    userDigg = json['user_digg'];
    buryCount = json['bury_count'];
    userBury = json['user_bury'];
    if (json['thumb_image_list'] != null) {
      thumbImageList = [];
      json['thumb_image_list'].forEach((v) {
        thumbImageList!.add(v);
      });
    }
    if (json['large_image_list'] != null) {
      largeImageList = [];
      json['large_image_list'].forEach((v) {
        largeImageList!.add(v);
      });
    }
    pendants = json['pendants'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['id_str'] = this.idStr;
    data['create_time'] = this.createTime;
    data['text'] = this.text;
    data['content_rich_span'] = this.contentRichSpan;
    data['user_id'] = this.userId;
    data['user_name'] = this.userName;
    data['user_verified'] = this.userVerified;
    data['user_auth_info'] = this.userAuthInfo;
    data['user_profile_image_url'] = this.userProfileImageUrl;
    data['band_url'] = this.bandUrl;
    data['band_name'] = this.bandName;
    data['is_blocking'] = this.isBlocking;
    data['is_blocked'] = this.isBlocked;
    data['auth_verified_info'] = this.authVerifiedInfo;
    data['is_pgc_author'] = this.isPgcAuthor;

    data['author_badge'] = this.authorBadge.map((v) => v.toJson()).toList();

    if (this.authorBadgeNight != null) {
      data['author_badge_night'] =
          this.authorBadgeNight!.map((v) => v).toList();
    }
    data['digg_count'] = this.diggCount;
    data['user_digg'] = this.userDigg;
    data['bury_count'] = this.buryCount;
    data['user_bury'] = this.userBury;
    if (this.thumbImageList != null) {
      data['thumb_image_list'] = this.thumbImageList!.map((v) => v).toList();
    }
    if (this.largeImageList != null) {
      data['large_image_list'] = this.largeImageList!.map((v) => v).toList();
    }
    data['pendants'] = this.pendants;
    return data;
  }
}

class AuthorBadge {
  late String url;
  late String openUrl;
  late int width;
  late int height;
  late List<UrlList> urlList;
  late String uri;
  late int position;
  late int scene;

  AuthorBadge(
      {required this.url,
      required this.openUrl,
      required this.width,
      required this.height,
      required this.urlList,
      required this.uri,
      required this.position,
      required this.scene});

  AuthorBadge.fromJson(Map<String, dynamic> json) {
    url = json['url'];
    openUrl = json['open_url'];
    width = json['width'];
    height = json['height'];
    if (json['url_list'] != null) {
      urlList = [];
      json['url_list'].forEach((v) {
        urlList.add(new UrlList.fromJson(v));
      });
    }
    uri = json['uri'];
    position = json['position'];
    scene = json['scene'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['url'] = this.url;
    data['open_url'] = this.openUrl;
    data['width'] = this.width;
    data['height'] = this.height;

    data['url_list'] = this.urlList.map((v) => v.toJson()).toList();

    data['uri'] = this.uri;
    data['position'] = this.position;
    data['scene'] = this.scene;
    return data;
  }
}

class AuthorBadgeNight extends AuthorBadge {
  AuthorBadgeNight.fromJson(Map<String, dynamic> json) : super.fromJson(json);
}

class UrlList {
  late String url;

  UrlList({required this.url});

  UrlList.fromJson(Map<String, dynamic> json) {
    url = json['url'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['url'] = this.url;
    return data;
  }
}

class MediaInfo {
  late String name;
  late String avatarUrl;

  MediaInfo({required this.name, required this.avatarUrl});

  MediaInfo.fromJson(Map<String, dynamic> json) {
    name = json['name'];
    avatarUrl = json['avatar_url'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['name'] = this.name;
    data['avatar_url'] = this.avatarUrl;
    return data;
  }
}
